

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  font-family: 'PingFang SC', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  background-color: $bg-color;
  color: $text-primary;
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease;

  &:hover {
    color: $primary-color;
  }
}

.container {
  width: 100%;
  max-width: $container-width;
  margin: 0 auto;
  padding: 0 $spacing-md;
}

// Main layout
.main-layout {
  display: flex;
  margin-top: $header-height + $spacing-md;
}

.three-column-layout {
  display: flex;
  gap: $spacing-md;
  min-height: calc(100vh - $header-height - $spacing-md);
}

// Left sidebar
.left-sidebar {
  width: $sidebar-width;
  flex-shrink: 0;
  position: sticky;
  top: $header-height + $spacing-md;
  height: calc(100vh - $header-height - $spacing-md);
  overflow-y: auto;
  background-color: #fff;
  border-radius: $border-radius-md;
  box-shadow: $box-shadow;
}

// Main content
.main-content {
  flex: 1;
  min-width: 0;
  background-color: #fff;
  border-radius: $border-radius-md;
  box-shadow: $box-shadow;
}

// Right sidebar
.right-sidebar {
  width: $right-sidebar-width;
  flex-shrink: 0;
  position: sticky;
  top: $header-height + $spacing-md;
  height: calc(100vh - $header-height - $spacing-md);
  overflow-y: auto;
}

// Card styles
.card {
  background-color: #fff;
  border-radius: $border-radius-md;
  box-shadow: $box-shadow;
  padding: $spacing-md;
  margin-bottom: $spacing-md;
  transition: box-shadow 0.3s ease;

  &:hover {
    box-shadow: $box-shadow-hover;
  }
}

// Article item
.article-item {
  border-bottom: 1px solid $border-color;
  padding: $spacing-md 0;
  transition: background-color 0.2s ease;

  &:hover {
    background-color: rgba(0, 0, 0, 0.01);
  }

  &:last-child {
    border-bottom: none;
  }
}

// Responsive layout
@media (max-width: $breakpoint-lg) {
  .three-column-layout {
    flex-wrap: wrap;
  }

  .left-sidebar, .right-sidebar {
    width: 100%;
    position: static;
    height: auto;
  }

  .right-sidebar {
    order: 3;
  }
}

@media (max-width: $breakpoint-md) {
  .container {
    padding: 0 $spacing-sm;
  }

  .main-layout {
    margin-top: $header-height + $spacing-sm;
  }
}
